//
//  AECommunityDetailViewModel.h
//  AESOLAR_IOS
//
//  Created by Bin Tang on 2024/10/20.
//  Copyright © 2024 Mr.Wang. All rights reserved.
//

#import "TYZBaseViewModel.h"
#import "AECommunityDetailModel.h"
#import "AENewsInfoModel.h"
#import "AENewsCommentsRequest.h" // 评论列表
#import "AENewsLikeRequest.h" // 点赞/取消
#import "AENewsCommentsLikeRequest.h" // 评论点赞/取消
#import "AENewsAddCommentRequest.h" // 添加评论
#import "AENewsBrowseRequest.h" // 浏览获取积分

NS_ASSUME_NONNULL_BEGIN

@interface AECommunityDetailViewModel : TYZBaseViewModel

/// 外面传进来的
@property (nonatomic, strong) AENewsInfoModel *newsInfoModel;

@property (nonatomic, copy) NSString *commentContent;

/// 回复类型。1 回帖；2 回复用户(评论)
@property (nonatomic, assign) NSInteger commentType;

@property (nonatomic, assign) BOOL isSendSuc; ///< 发送成功

/// 点击tabBarItem的时间
@property (nonatomic, strong) NSDate *lastDate;

/// 是否发送中
@property (nonatomic, assign) BOOL isSending;

@property (nonatomic, assign) CGSize imageSize; ///< 显示图片的大小(图片、视频图片)

@property (nonatomic, assign) float imageWH; ///< 只是图片的宽高。不是视频图片的

@property (nonatomic, assign) CGFloat imagesHeight; ///< 图片的总高度

//@property (nonatomic, strong) AECommunityDetailModel *detailModel;



/// 评论列表
/// - Parameter completion: completion description
- (void)requestWithNewsComments:(RequestCompletionBlock)completion;


/// 点赞/取消
/// - Parameters:
///   - newsId: 新闻id
///   - like: 1 赞；1 取消
///   - completion: completion description
- (void)requestWithNewsLikeNewsId:(NSInteger)newsId like:(NSInteger)like completion:(RequestCompletionBlock)completion;


- (void)requestWithNewsLikeCommentId:(NSInteger)commentId like:(NSInteger)like completion:(RequestCompletionBlock)completion;

/// 添加评论
/// - Parameters:
///   - comment: 评论内容
///   - completion: completion description
- (void)requestWithAddComment:(NSString *)comment completion:(RequestCompletionBlock)completion;

/// 浏览获取积分
/// - Parameter completion: completion description
- (void)requestWithNewsBrowse:(RequestCompletionBlock)completion;

@end

NS_ASSUME_NONNULL_END
